<template>
	<view class=" padding">
		<TopNav title="工作台"></TopNav>
		<view class="cu-card case no-card">
			<view class="cu-item shadow">
				<view class="bg-white padding padding-bottom-xs">
					<view class="action">
						<text class="cuIcon-titles text-blue"></text>
						<text class="text-lg text-bold">生产管理</text>
					</view>
				</view>
			</view>
			<view class="cu-list grid col-4 no-border">
				<view class="cu-item" v-for="(item,index) in productionList" :key="index"
					@click="handleNavigeteTo(item.path)">
					<view class="flex justify-center">
						<view class="padding-xs bg-gray radius">
							<image :src="item.src" mode="widthFix" class="cu-avatar lg radius bg-transparent">
							</image>
						</view>
					</view>
					<text>{{item.title}}</text>
				</view>
			</view>
		</view>

		<view class="cu-card case no-card margin-top">
			<view class="cu-item shadow">
				<view class="bg-white padding padding-bottom-xs">
					<view class="action">
						<text class="cuIcon-titles text-green"></text>
						<text class="text-lg text-bold">库存管理</text>
					</view>
				</view>
			</view>
			<view class="cu-list grid col-4 no-border">
				<view class="cu-item" v-for="(item,index) in inventoryList" :key="index"
					@click="handleNavigeteTo(item.path)">
					<view class="flex justify-center">
						<view class="padding-xs bg-gray">
							<image :src="item.src" mode="widthFix" class="cu-avatar lg radius bg-transparent">
							</image>
						</view>
					</view>
					<text>{{item.title}}</text>
				</view>
			</view>
		</view>

<!-- 		<view class="cu-card case no-card margin-top">
			<view class="cu-item shadow">
				<view class="bg-white padding padding-bottom-xs">
					<view class="action">
						<text class="cuIcon-titles text-green"></text>
						<text class="text-df text-bold">收支分析</text>
					</view>
				</view>
			</view>
			<view class="cu-list grid col-4 no-border">
				<view class="cu-item" v-for="(item,index) in incomeAndExpensesList" :key="index"
					@click="handleNavigeteTo(item.path)">
					<view class="flex justify-center">
						<view class="padding-xs bg-gray">
							<image src="/static/favicon.ico" mode="widthFix" class="cu-avatar lg radius bg-transparent">
							</image>
						</view>
					</view>
					<text>{{item.title}}</text>
				</view>
			</view>
		</view> -->

	</view>
</template>

<script>
	export default {
		data() {
			return {
				productionList: [{
					src: 'cardboardfill',
					title: '生产记录',
					path: '/pages/work/production/index',
					src: '/static/images/work/1-1.png'
				}, {
					src: 'cardboardfill',
					title: '抽样检样',
					path: '/pages/work/sampling/index',
					src: '/static/images/work/1-2.png'
				}, {
					src: 'cardboardfill',
					title: '用药记录',
					path: '/pages/work/medicate/index',
					src: '/static/images/work/1-3.png'
				}, {
					src: 'cardboardfill',
					title: '苗种放养',
					path: '/pages/work/breeding/index',
					src: '/static/images/work/1-4.png'
				}, {
					src: 'cardboardfill',
					title: '捕捞记录',
					path: '/pages/work/catch/index',
					src: '/static/images/work/1-8.png'
				}, {
					src: 'cardboardfill',
					title: '池塘清淤',
					path: '/pages/work/desilt/index',
					src: '/static/images/work/1-5.png'
				}, {
					src: 'cardboardfill',
					title: '设备检修',
					path: '/pages/work/maintenance/index',
					src: '/static/images/work/1-6.png'
				}, {
					src: 'cardboardfill',
					title: '销售记录',
					path: '/pages/work/sale/index',
					src: '/static/images/work/1-7.png'
				}, ],
				inventoryList: [{
					src: 'cardboardfill',
					title: '仓库管理',
					path: '/pages/work/warehouse/index',
					src: '/static/images/work/2-1.png'
				}, {
					src: 'cardboardfill',
					title: '库存记录',
					path: '/pages/work/inventory-record/index',
					src: '/static/images/work/2-2.png'
				}, {
					src: 'cardboardfill',
					title: '饲料库存',
					path: '/pages/work/feed-inventory/index',
					src: '/static/images/work/2-3.png'
				}, {
					src: 'cardboardfill',
					title: '苗种库存',
					path: '/pages/work/breeding-inventory/index',
					src: '/static/images/work/2-4.png'
				}, {
					src: 'cardboardfill',
					title: '成品库存',
					path: '/pages/work/catch-inventory/index',
					src: '/static/images/work/2-6.png'
				}, {
					src: 'cardboardfill',
					title: '药品库存',
					path: '/pages/work/medicate-inventory/index',
					src: '/static/images/work/2-5.png'
				}],
				incomeAndExpensesList: [{
					src: 'cardboardfill',
					title: '支出成本'
				}, {
					src: 'cardboardfill',
					title: '收入情况'
				}],
			}
		},
		methods: {
			handleNavigeteTo(path) {
				if (path) this.$tab.navigateTo(path)
			}
		}
	}
</script>

<style lang="scss">
	.bg-gray {
		background-color: #f0f0f063;
		color: #333333;
		border-radius: 10px;
	}
</style>